/**
 * 
 */
package com.slink.fxfk.common.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.slink.fxfk.common.domain.po.PUser;
import com.slink.fxfk.common.service.UserService;
import com.slink.fxfk.framework.exception.FXFKException;

/**
 * @author 新
 *
 */
@Controller
public class IndexAction {

	@Autowired
	UserService userService;
	
	//显示首页
	@RequestMapping("/index")
	public ModelAndView index(HttpServletRequest request) {
		PUser user = this.userService.getUser("a8OttJBJcuYNqtTi2Se");
		if (null == user) {
			throw new FXFKException("0101001");
		}
		return new ModelAndView("/home").addObject("user", user);
	}
}
